import request from '@/utils/request'

// 添加朋友查询
export function addFriendQuery(cond) {
  return request({
    url: '/zhc/chat/add-friend-query',
    method: 'get',
    params: cond
  })
}
// 添加朋友申请
export function addFriendRequest(friend) {
  return request({
    url: '/zhc/chat/add-friend-request',
    method: 'post',
    data: friend
  })
}
// 好友申请列表查询
export function queryFriendRequest() {
  return request({
    url: '/zhc/chat/query-friend-request',
    method: 'get'
  })
}
// 同意/拒绝 好友申请
export function executeFriendRequest(query){
  return request({
    url:'/zhc/chat/execute-friend-request',
    method: 'get',
    params: query
  })
}
export function queryFriend(){
  return request({
    url:'/zhc/chat/queryFriend',
    method: 'get',
  })
}
//查询最近聊天记录
export function querylatestMessage(){
  return request({
    url:'/zhc/chat/query-chat-list',
    method: 'get',
  })
}
//查询聊天记录
export function queryChatHistory(userId){
  return request({
    url:'/zhc/chat/query-chat-history/'+userId,
    method: 'get',
  })
}